<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>JSON字符串转js对象</title>
</head>

<body>
  <script>
    var str = '{"age":"回复即可收到","name":"123"}';
    var obj = JSON.parse(str);//转对象
    var jsonStr = JSON.stringify(obj);//转字符串
    console.log(jsonStr);
    console.log(obj)
  </script>
</body>

</html>